//
//  SetUpTableCell.m
//  滴滴快拍
//
//  Created by dllo on 16/5/20.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SetUpTableCell.h"

@implementation SetUpTableCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
    
}

- (void)createView {
    self.backgroundColor = [UIColor whiteColor];
    //    self.contentView.backgroundColor = [UIColor clearColor];
    
    
    self.titleLabel = [[BaseLabel alloc] init];
    [self.contentView addSubview:self.titleLabel];
    
    self.bSwitch = [[UISwitch alloc] init];
    [self.contentView addSubview:self.bSwitch];
    
    self.goImageView = [[BaseImageView alloc] init];
    [self.contentView addSubview:self.goImageView];
    
    self.contentLabel = [[BaseLabel alloc] init];
    [self.contentView addSubview:self.contentLabel];
    
    self.loginLabel = [[BaseLabel alloc] init];
    [self.contentView addSubview:self.loginLabel];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.titleLabel.frame = CGRectMake(10, 10, 160, 20);
    
    self.bSwitch.frame = CGRectMake(SCREEN_WIDTH - 70, 10, 40, 20);
    
    self.contentLabel.frame = CGRectMake(SCREEN_WIDTH - 140, 10, 110, 20);
    self.contentLabel.textAlignment = NSTextAlignmentRight;
    
    self.goImageView.frame = CGRectMake(SCREEN_WIDTH - 30, 10, 20, 20);
    
    self.loginLabel.frame = CGRectMake(0, 10, SCREEN_WIDTH, 20);
    self.loginLabel.textAlignment = NSTextAlignmentCenter;
    self.loginLabel.font = [UIFont systemFontOfSize:20];
}



@end
